package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itheima.domain.db.BlackList;
import com.itheima.domain.db.UserInfo;
import org.apache.ibatis.annotations.Select;

//查询指定用户的黑名单用户列表
public interface BlackListMapper extends BaseMapper<BlackList> {
     @Select("SELECT tui.* FROM `tb_black_list` tbl JOIN tb_user_info tui ON tbl.`black_user_id` =  tui.`id` WHERE tbl.`user_id` = #{userId}")
     IPage<UserInfo> findBlackList(IPage page, Long userId);
}